/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bugman.business;

import com.bugman.entity.Bug;
import com.bugman.entity.Comment;
import com.bugman.entity.User;
import com.bugman.exceptions.BadAuthorException;
import com.bugman.exceptions.CommentIsNotLastException;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Flashman
 */
@Local
public interface CommentService {

    public void createComment(Comment comment);
    public void deleteComment(Comment comment, User loggedUser) throws CommentIsNotLastException, BadAuthorException;
    public List<Comment> getLastComments(Integer count);
    public List<Comment> getLastComments(Bug bug, Integer count);
    public Integer getCommentsCount(Bug bug);

}
